<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改外汇详情')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-detail-edit" th:object="${stForeignExchangenDetail}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">外汇id：</label>
                <div class="col-sm-8">
                    <input name="exchangenId" th:field="*{exchangenId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="dataTime" th:value="${#dates.format(stForeignExchangenDetail.dataTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">现价：</label>
                <div class="col-sm-8">
                    <input name="nowPrice" th:field="*{nowPrice}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">涨跌：</label>
                <div class="col-sm-8">
                    <input name="upDownVal" th:field="*{upDownVal}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">买价：</label>
                <div class="col-sm-8">
                    <input name="buyPrice" th:field="*{buyPrice}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">卖价：</label>
                <div class="col-sm-8">
                    <input name="sellPrice" th:field="*{sellPrice}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">振幅：</label>
                <div class="col-sm-8">
                    <input name="amplitude" th:field="*{amplitude}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">涨幅%：</label>
                <div class="col-sm-8">
                    <input name="upPercent" th:field="*{upPercent}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">1分钟涨幅%：</label>
                <div class="col-sm-8">
                    <input name="upPercentOne" th:field="*{upPercentOne}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">3分钟涨幅%：</label>
                <div class="col-sm-8">
                    <input name="upPercentThree" th:field="*{upPercentThree}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">最高价：</label>
                <div class="col-sm-8">
                    <input name="highestPrice" th:field="*{highestPrice}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">最低价：</label>
                <div class="col-sm-8">
                    <input name="lowestPrice" th:field="*{lowestPrice}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">开盘：</label>
                <div class="col-sm-8">
                    <input name="openPrice" th:field="*{openPrice}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">跳动度：</label>
                <div class="col-sm-8">
                    <input name="runout" th:field="*{runout}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "stock/exchangen/detail";
        $("#form-detail-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-detail-edit').serialize());
            }
        }

        $("input[name='dataTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>